﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Kokomo.Mirror.CliMetadata
{
	//[TypeConverter(typeof(StringRefConverter))]
	public struct StringRef// : DataRef
	{
		public readonly int HeapIndex;
		public StringRef(
			int heapIndex
			//MetadataContainer container
			)
			//: base(heapIndex, container)
		{
			this.HeapIndex = heapIndex;
		}

		//public string String { get { return this.Container.GetString(this.HeapIndex); } }

		public override string ToString()
		{
			//return string.Format("0x{0:X8}: \"{1}\"", this.HeapIndex, this.String);
			//return string.Format("\"{0}\"", this.String);
			return this.HeapIndex.ToString("X4");
		}
	}
}
